package sample;

import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;

public class SetSize {
    public static void SetElementSize(VBox vBox, int width, int hight){
       vBox.setMaxHeight(hight);
       vBox.setMinHeight(hight);
       vBox.setPrefHeight(hight);
       vBox.setMinWidth(width);
       vBox.setMaxWidth(width);
       vBox.setPrefWidth(width);
    }
    public static void SetElementSize(ScrollPane vBox, int width, int hight){
        vBox.setMaxHeight(hight);
        vBox.setMinHeight(hight);
        vBox.setPrefHeight(hight);
        vBox.setMinWidth(width);
        vBox.setMaxWidth(width);
        vBox.setPrefWidth(width);
    }
    public static void SetElementSize(AnchorPane vBox, int width, int hight){
        vBox.setMaxHeight(hight);
        vBox.setMinHeight(hight);
        vBox.setPrefHeight(hight);
        vBox.setMinWidth(width);
        vBox.setMaxWidth(width);
        vBox.setPrefWidth(width);
    }

    public static void SetElementSize(HBox hBox, int width, int hight){
        hBox.setMaxHeight(hight);
        hBox.setMinHeight(hight);
        hBox.setPrefHeight(hight);
        hBox.setMinWidth(width);
        hBox.setMaxWidth(width);
        hBox.setPrefWidth(width);
    }
    public static void SetHightSize(HBox hBox, int hight){
        hBox.setMaxHeight(hight);
        hBox.setMinHeight(hight);
        hBox.setPrefHeight(hight);
//        hBox.setMinWidth(width);
//        hBox.setMaxWidth(width);
//        hBox.setPrefWidth(width);
    }
    public static void SetHightSize(VBox hBox, int hight){
        hBox.setMaxHeight(hight);
        hBox.setMinHeight(hight);
        hBox.setPrefHeight(hight);
//        hBox.setMinWidth(width);
//        hBox.setMaxWidth(width);
//        hBox.setPrefWidth(width);
    }
    public static void SetHightSize(AnchorPane hBox, int hight){
        hBox.setMaxHeight(hight);
        hBox.setMinHeight(hight);
        hBox.setPrefHeight(hight);
//        hBox.setMinWidth(width);
//        hBox.setMaxWidth(width);
//        hBox.setPrefWidth(width);
    }
    public static void SetWidthSize(HBox hBox, int width){
//        hBox.setMaxHeight(hight);
//        hBox.setMinHeight(hight);
//        hBox.setPrefHeight(hight);
        hBox.setMinWidth(width);
        hBox.setMaxWidth(width);
        hBox.setPrefWidth(width);
    }
    public static void SetWidthSize(VBox hBox, int width){
//        hBox.setMaxHeight(hight);
//        hBox.setMinHeight(hight);
//        hBox.setPrefHeight(hight);
        hBox.setMinWidth(width);
        hBox.setMaxWidth(width);
        hBox.setPrefWidth(width);
    }

    public static void SetWidthSize(AnchorPane hBox, int width){
//        hBox.setMaxHeight(hight);
//        hBox.setMinHeight(hight);
//        hBox.setPrefHeight(hight);
        hBox.setMinWidth(width);
        hBox.setMaxWidth(width);
        hBox.setPrefWidth(width);
    }

    public static void SetHightSize(Pane hBox, int hight){
        hBox.setMaxHeight(hight);
        hBox.setMinHeight(hight);
        hBox.setPrefHeight(hight);
//        hBox.setMinWidth(width);
//        hBox.setMaxWidth(width);
//        hBox.setPrefWidth(width);
    }
    public static void SetWidthSize(Pane hBox, int width){
        hBox.setMinWidth(width);
        hBox.setMaxWidth(width);
        hBox.setPrefWidth(width);
    }
    public static  void setLabelStyle(Label label,String colorFont){
        if(BeautyMain.themeURL==""||BeautyMain.themeURL==null){

        }else{
            label.setTextFill(Color.web("rgba("+colorFont+")"));
        }



    }

}
